spinner: Use the element name spinner
authorMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2015 19:20:23 +0000 (15:20 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2015 19:45:13 +0000 (15:45 -0400)
Switch GtkSpinner from using the .spinner style class to
using the element name spinner for its css node.

gtk/gtkspinner.c

index 0e08f848040e0e53ed76d86678385140f845c9e2..cb3141946540f2f345699c1575c7e699c67dd4bf 100644 (file)
  *
  * To start the animation, use gtk_spinner_start(), to stop it
  * use gtk_spinner_stop().
+ *
+ * # CSS nodes
+ *
+ * GtkSpinner has a single CSS node with the name spinner.
  */
 
 
@@ -122,6 +126,7 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
                                                          GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
 
   gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SPINNER_ACCESSIBLE);
+  gtk_widget_class_set_css_name (widget_class, "spinner");
 }
 
 static void
@@ -163,14 +168,9 @@ gtk_spinner_set_property (GObject      *object,
 static void
 gtk_spinner_init (GtkSpinner *spinner)
 {
-  GtkStyleContext *context;
-
   spinner->priv = gtk_spinner_get_instance_private (spinner);
 
   gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
-
-  context = gtk_widget_get_style_context (GTK_WIDGET (spinner));
-  gtk_style_context_add_class (context, GTK_STYLE_CLASS_SPINNER);
 }
 
 static void